// 导入封装好的axios
import request from './index';

import qs from 'qs'

// 定义一个请求精品的数据
export const JingPinAPI = () => request.get('products/recommend')

// 定义一个热门的请求 
export const HotAPI = () => request.get('products/hot')

// 定义一个发送验证码的请求
export const SendSMSAPI = (params) => request.post('sendSMS', qs.stringify(params))

// 登录的请求
export const PhoneReginAPI = (params) => request.post('phoneRegin', qs.stringify(params))

// 微信扫码登录
export const WeChatAPI = (params) => request.post('wechatUsers/PCLogin', qs.stringify(params))

// 手机绑定微信
export const BindingAPI = (params) => request.post('wechatUsers/binding', qs.stringify(params))

// 请求用户信息
export const UserProfilesAPI = () => request.get('shop/userProfiles')

// 详情的请求 
export const DetailsAPI = (id) => request.get(`products/${id}`)